<?php
/**
 * @return
 * @author 朱乐斌
 * @date
 */

namespace app\api\controller;

use app\api\model\AdminModel;
use app\BaseController;
use app\Request;

class Info extends BaseController
{

    // 获取用户信息
    public function infoAvatar(Request $request)
    {
        $data = $request->mobile;
        $dataArray = (array)$data;
        if (empty($data)) return errMsg('您还没有登录,请重新登录');
        $admin = AdminModel::where('mobile', $dataArray['mobile'])->field('mobile,nickname,avatar')->find();
        return json([
            'msg' => '成功',
            'code' => 200,
            'data' => $admin
        ]);
    }

}